package org.example;/*
 * title:
 * author:
 * date:
 * description:
 * */

import java.util.concurrent.*;

public class FutrueTask {

    public static void main(String[] args) throws ExecutionException, InterruptedException {
        FutureTask futrueTask=new FutureTask(new MyThread());
        Thread t1=new Thread(futrueTask,"t1");
        t1.start();
        System.out.println(futrueTask.get());

    }
}
class MyThread implements Callable<String>{

    @Override
    public String call() throws Exception {
        System.out.println("come in call");
        return "hello callable";
    }
}
